package name.as3.geom
{
	import flash.geom.Point;
	
	public class Line
	{
		public var k:Number = 0;
		public var b:Number = 0 ;
		private var m_obPointA:Point=new Point() ;
		private var m_obPointB:Point=new Point()  ;
		/**∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥构造函数
		 */		
		public function Line(objA:Point ,objB:Point)
		{
			super() ;
			if(objA && objB )
			{
				m_obPointA = objA ;
				m_obPointB = objB ;
				
				
			}
		}
		/**
		 *∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥位置投影函数 
		 * @param obj
		 * @return 
		 * 
		 */		
		public function projectPoint(obj:Point):Point
		{
			return null ;
		}
		/**
		 *∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥位置镜像函数 
		 * @param obPoint
		 * @return 
		 * 
		 */		
		public function mirrorPoint(obPoint:Point):Point
		{
			var obResult:Point = new Point() ;
			
			
			
			
			return obResult ;
		}
		/**
		 *∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥位置偏移函数 
		 * @param value
		 * 
		 */		
		public function ofset(value:Number):void
		{
			var angle:Number = Math.atan2(m_obPointB.x - m_obPointA.x , m_obPointB.y - m_obPointA.y) ;
			var ofsetX:Number = value * Math.cos(angle);
			var ofsetY:Number = value * Math.sin(angle ) ;
			m_obPointA.x += ofsetX ;
			m_obPointA.y -= ofsetY ;
			m_obPointB.x += ofsetX ;
			m_obPointB.y -= ofsetY ;
		}
		/**
		 *∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥起点位置获取函数 
		 * @return 
		 * 
		 */		
		public function get pointA():Point
		{
			return m_obPointA ;
		}
		/**
		 *∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥∥终点位置获取函数 
		 * @return 
		 * 
		 */		
		public function get pointB():Point
		{
			return m_obPointB ;
		}
	

	}
}